Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to CI check for specification version. #1760

Conversation

kairoaraujo
Copy link
Collaborator

This commit adds to the CI an automatic check for the TUF
specification version and compares it with the python-tuf metadata
API version.

If the version does not match and there is not a issue already open,
a new issue is opened.

Closes #1598

Signed-off-by: Kairo de Araujo [email protected]

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@kairoaraujo
Copy link
Collaborator Author

First, thank you to @jku for making it so easy to do.

Some additional information:

I run the tests on my forked repo.
The first run created the issue.
The second run does not open as the issue is already opened ( + there is an issue already closed.)

I decided not to add any version information to not make the issue obsolete in case of a new version.

@coveralls
Copy link

coveralls commented Jan 7, 2022

Pull Request Test Coverage Report for Build 1681675567

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.737%

Totals Coverage Status
Change from base Build 1681236343: 0.0%
Covered Lines: 4092
Relevant Lines: 4171

💛 - Coveralls

@MVrachev
Copy link
Collaborator

The CI failure is fixed in #1762.
If you rebase after the merge of this pr it should be fixed.

Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good enough, thanks.

I'm a bit on the fence about output (both logging and the issue message): It says what was done but includes nothing that would help debugging if things break (like the actual version strings that were compared)...

So, approving as is but please have a look at the logging/output: if you think it needs work we can do that

console.log("Specification version does not match...")
const repo = context.repo.owner + "/" + context.repo.repo
const issues = await github.rest.search.issuesAndPullRequests({
q: "specification+has+new+version+in:title+state:open+type:issue+repo:" + repo,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the "in:title" search might actually require quotes to get an exact search string but I think I'm fine with this: let's have another look if we get false positives in this.

Kairo de Araujo added 3 commits January 11, 2022 08:51
This commit adds to the CI an automatic check for the TUF
specification version and compares it with the python-tuf metadata
API version.

If the version does not match and there is not a issue already open,
a new issue is opened.

Closes theupdateframework#1598

Signed-off-by: Kairo de Araujo <[email protected]>
Fix query syntax that was missing the repository parameter

Signed-off-by: Kairo de Araujo <[email protected]>
Minor changes to the console logs add versioning and simplify when
they are logged.

Signed-off-by: Kairo de Araujo <[email protected]>
@kairoaraujo kairoaraujo force-pushed the issue#1598/automated_issue_spec_version branch from c540f59 to 852bd02 Compare January 11, 2022 08:48
read the contents and write (open) issues

Signed-off-by: Kairo de Araujo <[email protected]>
@jku jku merged commit a842ebf into theupdateframework:develop Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Develop a process for keeping metadata.SPECIFICATION_VERSION up-to-date
4 participants